package org.zhouhe.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * HotProjectRegion entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "hot_project_region", catalog = "zpd0t1_db")
public class HotProjectRegion implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = -6936629013287178569L;
	private Integer hotProjectRegionId;
	private Region region;
	private HotProject hotProject;

	// Constructors

	/** default constructor */
	public HotProjectRegion() {
	}

	/** full constructor */
	public HotProjectRegion(Region region, HotProject hotProject) {
		this.region = region;
		this.hotProject = hotProject;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "hot_project_region_id", unique = true, nullable = false)
	public Integer getHotProjectRegionId() {
		return this.hotProjectRegionId;
	}

	public void setHotProjectRegionId(Integer hotProjectRegionId) {
		this.hotProjectRegionId = hotProjectRegionId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "region_id")
	public Region getRegion() {
		return this.region;
	}

	public void setRegion(Region region) {
		this.region = region;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "hot_project_id")
	public HotProject getHotProject() {
		return this.hotProject;
	}

	public void setHotProject(HotProject hotProject) {
		this.hotProject = hotProject;
	}

}